/**
 * Created by ls-PC on 2016/7/27.
 */
var _       = require('lodash');
var helpers = require('./_helpers');
var orm     = require('../../../../');
var messageCode=require('../../config/code');

module.exports={
    list:function(req,res){
        var params=_.pick(req.body, 'userId');
        req.models.family.find({userId:params.userId},function(err,famliy){
            if(err){
                return res.send({message:messageCode.list_family_fail});

            }
            return res.send({message:messageCode.list_family_success,data:JSON.stringify(famliy)});
        })
    }
}